package com.tch.controller;

import com.tch.entity.UserEntity;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;
import java.util.ArrayList;
import java.util.Map;

@Controller
public class ThymeLeafController {
    @RequestMapping("/myThymeLeaf")
    public String myThymeLeaf(HttpServletRequest request, Map<String,Object> result){
        //result.put("user",new UserEntity("zhangs","22"));
        ArrayList<UserEntity> list = new ArrayList<>();
        list.add(new UserEntity("zhangs01","22"));
        list.add(new UserEntity("zhangs02","25"));
        result.put("user",list);
        return "mythymeleaf";
    }

}
